package service.order;

import dao.AlbumDAO;
import dao.OrderDAO;
import dao.RecordDuplicateException;
import entities.Customer;
import entities.Album;
import entities.Order;


public class OrderServiceInMemory implements OrderService {

	public OrderServiceInMemory(){
		
	}
	
	public static OrderService newInstance(){
		return new OrderServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public Order findOrder(String orderID){
		OrderDAO db = OrderDAO.getInstance();
		Order result = null;
		result = db.findOrder(orderID);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addOrder(Order obj) throws RecordDuplicateException{
		OrderDAO db = OrderDAO.getInstance();	
		db.addOrder(obj);
		return;
	}





}
